package com.chen.service.impl;

import com.chen.entity.Permission;
import com.chen.mapper.PermissionMapper;
import com.chen.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PermissionServiceImpl implements PermissionService {
    @Autowired
    private PermissionMapper permissionMapper;

    /**
     * 根据userId 查询对应的权限
     * @param userId
     * @return
     */
    @Override
    public List<Permission> listPermissionByUserId(Integer userId) {
        return permissionMapper.listPermissionByUserId(userId);
    }
}
